OTSetBlocking
Allows a provider to wait or block until it is able to send or receive data.C INTERFACE
OSStatus OTSetBlocking(ProviderRef ref);C++ INTERFACE
OSStatus TProvider::SetBlocking();PARAMETERS
ref
- The provider reference of the provider that is to block.
DESCRIPTION
TheOTSetBlocking
function causes provider functions that send or receive data to wait if current conditions prevent them from completing an operation. By default, a provider is in nonblocking mode, in which case, if a provider function were unable to complete sending or receiving data, it would return immediately with a result that would tell you why the operation was unable to complete.If a provider is in blocking mode and you call the
OTCloseProvider
function
to close the provider, Open Transport gives each Streams module up to
15 seconds to process outgoing commands. It is recommended that you call theOTSetNonBlocking
function before you call theOTCloseProvider
function.SEE ALSO
Blocking is described in "Setting a Provider's Blocking Status" on page 2-10.To set a provider's blocking status to nonblocking, call the
OTSetNonBlocking
function (page 2-33). To find out a provider's blocking status, call theOTIsNonBlocking
function (page 2-35).Blocking attributes affect endpoint providers more than other providers. For more information see the discussion about modes of operation in the chapter "Endpoints" in this book.